<UserControl x:Class="Microsoft.Robotics.Manipulation.Visualization.ArmControlDisplayView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="776.866" d:DesignWidth="617.91">
    <Grid RenderTransformOrigin="0.386,0.493" Margin="0,19,-299,-483" ToolTip="Sync values with Current values">
        <Label Content="JointPosition" HorizontalAlignment="Left" Margin="15,12,0,0" VerticalAlignment="Top" Width="92" FontWeight="Bold"/>
        <Label Content="Current" HorizontalAlignment="Left" Margin="17,39,0,0" VerticalAlignment="Top" Width="53"/>
        <Label Content="Target" HorizontalAlignment="Left" Margin="17,67,0,0" VerticalAlignment="Top" Width="49"/>
        <Label Content="Delta" HorizontalAlignment="Left" Margin="17,97,0,0" VerticalAlignment="Top" Width="41"/>
        <TextBlock x:Name="CurrentJointPosition" HorizontalAlignment="Left" Height="23" Margin="75,41,0,0" TextWrapping="Wrap" Text="{Binding CurrentJointPosition}" VerticalAlignment="Top" Width="487"/>
        <TextBlock HorizontalAlignment="Left" Height="23" Margin="75,69,0,0" TextWrapping="Wrap" Text="{Binding TargetJointPosition}" VerticalAlignment="Top" Width="487"/>
        <TextBlock HorizontalAlignment="Left" Height="23" Margin="75,97,0,0" TextWrapping="Wrap" Text="{Binding DeltaJointPosition}" VerticalAlignment="Top" Width="487"/>

        <Label Content="Manual" HorizontalAlignment="Left" Margin="15,125,0,0" VerticalAlignment="Top" Width="51" Height="23"/>
        <TextBox x:Name="JointManualEntry" HorizontalAlignment="Left" Height="23" Margin="66,128,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="542" Text="{Binding JointManualEntry, Mode=OneWayToSource}"/>
        <Button x:Name="JointSync" Content="Sync" HorizontalAlignment="Left" Margin="442,159,0,0" VerticalAlignment="Top" Width="56" Click="JointSync_Click"/>
        <Button x:Name="JointUpdate" Content="Update" HorizontalAlignment="Left" Margin="511,159,0,0" VerticalAlignment="Top" Width="51" Click="JointUpdate_Click" ToolTip="Sends JointControl with these values" RenderTransformOrigin="-1.434,2.183"/>
        <CheckBox x:Name="JointUpdateCheckBox" Content="CheckBox" HorizontalAlignment="Left" Margin="206,303,0,0" VerticalAlignment="Top" Visibility="Hidden" IsChecked="{Binding DoJointUpdate}"/>

        <!-- Position and orientation information for Cartesian Control-->

        <Button x:Name="AddJointPositionButton" Content="Add/Update" HorizontalAlignment="Left" Margin="14,217,0,0" VerticalAlignment="Top" Width="75" Click="AddUpdateJointPosition_Click" ToolTip="Adds or updates the currently named position in list box"/>
        <CheckBox x:Name="AddUpdateJointPositionCheckBox" Content="CheckBox" HorizontalAlignment="Left" Margin="206,303,0,0" VerticalAlignment="Top" Visibility="Hidden" IsChecked="{Binding DoAddUpdateJointPosition}"/>

        <Button x:Name="GoToJointPosition" Content="GoTo" HorizontalAlignment="Left" Margin="211,253,0,0" VerticalAlignment="Top" Width="88" Click="GoToJointPosition_Click" ToolTip="Sends JointControl with these values"/>
        <Button x:Name="GoToSplinePosition" Content="GoSpline" HorizontalAlignment="Left" Margin="211,278,0,0" VerticalAlignment="Top" Width="88" Click="GoSpline_Click" ToolTip="Start a 1 segment spline to these locations"/>
        <ListBox x:Name="PositionsListBox" HorizontalAlignment="Left" Height="100" Margin="15,253,0,0" VerticalAlignment="Top" Width="191" SelectionChanged="ListBox_SelectionChanged_1"  SelectedItem="{Binding CurrentlySelectedJointPositionName}" ItemsSource="{Binding JointPositionNames, Mode=OneWay}" />
        <CheckBox x:Name="GoToJointPositionCheckBox" Content="CheckBox" HorizontalAlignment="Left" Margin="206,303,0,0" VerticalAlignment="Top" Visibility="Hidden" IsChecked="{Binding DoGoToJointPosition}"/>
        <CheckBox x:Name="GoToSplinePositionCheckBox" Content="CheckBox" HorizontalAlignment="Left" Margin="206,303,0,0" VerticalAlignment="Top" Visibility="Hidden" IsChecked="{Binding DoGoToSplineJointPosition}"/>
        <TextBox x:Name="PositionNameTextBox" HorizontalAlignment="Left" Height="23" Margin="112,214,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="130" Text="{Binding CurrentJointPositionName, Mode=OneWayToSource}"/>

        <Button x:Name="LoadButton" Content="Load" HorizontalAlignment="Left" Margin="119,358,0,0" VerticalAlignment="Top" Width="75" Click="LoadPositions_Click" ToolTip="Loads list of positions"/>
        <Button x:Name="SaveButton" Content="Save" HorizontalAlignment="Left" Margin="15,358,0,0" VerticalAlignment="Top" Width="75" Click="SavePositions_Click" ToolTip="Saves list of positions"/>
        <CheckBox x:Name="LoadPositionsCheckBox" Content="CheckBox" HorizontalAlignment="Left" Margin="206,303,0,0" VerticalAlignment="Top" Visibility="Hidden" IsChecked="{Binding LoadJointPositions}"/>
        <CheckBox x:Name="SavePositionsCheckBox" Content="CheckBox" HorizontalAlignment="Left" Margin="206,303,0,0" VerticalAlignment="Top" Visibility="Hidden" IsChecked="{Binding SaveJointPositions}"/>
        <ListView x:Name="ExtendedSplineList" HorizontalAlignment="Left" Height="193" Margin="14,393,0,0" VerticalAlignment="Top" Width="250" ItemsSource="{Binding Path=ExtendedSplinePoints}" RenderTransformOrigin="0.384,0.385" SelectionChanged="ListView_SelectionChanged">
            <ListView.View>
                <GridView AllowsColumnReorder="true">
                    <GridViewColumn DisplayMemberBinding="{Binding Path=Item1}" Header="Point Name" Width="190" />
                    <GridViewColumn DisplayMemberBinding="{Binding Path=Item2}" Header="Time" Width="50" />
                </GridView>
            </ListView.View>
        </ListView>
        <Button x:Name="AddToExtendedSpline" Content="Add To Spline" HorizontalAlignment="Left" Margin="211,325,0,0" VerticalAlignment="Top" Width="88" Click="AddToExtendedSpline_Click" ToolTip="Start a 1 segment spline to these locations"/>
        <Label Content="Relative Time:" HorizontalAlignment="Left" Margin="312,322,0,0" VerticalAlignment="Top" Width="84" Height="23"/>
        <TextBox x:Name="SplineSegmentRelativeTimeTextBox" HorizontalAlignment="Left" Height="23" Margin="401,322,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="65"/>
        <Label Content="seconds" HorizontalAlignment="Left" Margin="471,322,0,0" VerticalAlignment="Top" Width="84" Height="23"/>
        <Button x:Name="SplinePointUpButton" Content="Up" HorizontalAlignment="Left" Margin="269,456,0,0" VerticalAlignment="Top" Width="75" Click="SplinePointUpButton_Click"/>
        <Button x:Name="SplinePointDownButton" Content="Down" HorizontalAlignment="Left" Margin="269,481,0,0" VerticalAlignment="Top" Width="75" Click="SplinePointDownButton_Click"/>
        <Button x:Name="SplinePointDeleteButton" Content="Delete" HorizontalAlignment="Left" Margin="269,566,0,0" VerticalAlignment="Top" Width="75" />
        <Button x:Name="ExecuteExtendedSplineButton" Content="Execute" HorizontalAlignment="Left" Margin="269,524,0,0" VerticalAlignment="Top" Width="75" Click="ExecuteExtendedSplineButton_Click" />
        <Button x:Name="ChangePointTimeDurationButton" Content="UpdateTime" HorizontalAlignment="Left" Margin="269,419,0,0" VerticalAlignment="Top" Width="75" Click="ChangePointTimeDuration_Click" />
        <TextBox x:Name="SplineSegmentRelativeTimeUpdateTextBox" HorizontalAlignment="Left" Height="23" Margin="372,416,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="65" />
        <Label Content="seconds" HorizontalAlignment="Left" Margin="442,416,0,0" VerticalAlignment="Top" Width="84" Height="23"/>
        <Label Content="Joint Velocities:" HorizontalAlignment="Left" Margin="17,169,0,0" VerticalAlignment="Top" Width="99"/>
        <TextBlock x:Name="CurrentJointVelocity" HorizontalAlignment="Left" Height="23" Margin="121,172,0,0" TextWrapping="Wrap" Text="{Binding CurrentJointVelocity}" VerticalAlignment="Top" Width="487"/>

        <Button x:Name="HomeButton" Content="Home" HorizontalAlignment="Left" Margin="401,564,0,0" VerticalAlignment="Top" Width="75" Click="HomeButton_Click"/>
        <TextBox x:Name="HomeSpeedTextBox" Text="0.2" HorizontalAlignment="Left" Height="23" Margin="490,563,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="65" />
        <Label Content="rad/s" HorizontalAlignment="Left" Margin="575,562,0,0" VerticalAlignment="Top" Width="47" Height="23" RenderTransformOrigin="1.668,6.785"/>
    </Grid>
</UserControl>
